﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    x:Class="SoundPanelWPF.MainWindow"
    Title="MainWindow"
    Height="185"
    Width="525"
    Background="{x:Null}"
    WindowStyle="None">
    <Window.Resources>
        <ControlTemplate
            x:Key="ButtonControlTemplate1"
            TargetType="{x:Type Button}">
            <Grid>
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup
                        x:Name="CommonStates">
                        <VisualStateGroup.Transitions>
                            <VisualTransition
                                GeneratedDuration="0:0:0.2" />
                        </VisualStateGroup.Transitions>
                        <VisualState
                            x:Name="Normal" />
                        <VisualState
                            x:Name="MouseOver">
                            <Storyboard>
                                <ColorAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                    Storyboard.TargetName="ellipse">
                                    <EasingColorKeyFrame
                                        KeyTime="0"
                                        Value="#FFFFF500" />
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                    Storyboard.TargetName="ellipse">
                                    <EasingColorKeyFrame
                                        KeyTime="0"
                                        Value="#FFA11313" />
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState
                            x:Name="Pressed">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)"
                                    Storyboard.TargetName="ellipse">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="1" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)"
                                    Storyboard.TargetName="ellipse">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState
                            x:Name="Disabled" />
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
                <Ellipse
                    Fill="#FFF4F4F5"
                    StrokeThickness="3">
                    <Ellipse.Stroke>
                        <LinearGradientBrush
                            EndPoint="0.762,0.854"
                            StartPoint="0.238,0.146">
                            <GradientStop
                                Color="Black"
                                Offset="0" />
                            <GradientStop
                                Color="White"
                                Offset="1" />
                        </LinearGradientBrush>
                    </Ellipse.Stroke>
                </Ellipse>
                <Ellipse
                    Fill="#FFF4F4F5"
                    StrokeThickness="3"
                    Margin="3">
                    <Ellipse.Stroke>
                        <LinearGradientBrush
                            EndPoint="0.184,0.246"
                            StartPoint="0.816,0.754">
                            <GradientStop
                                Color="Black"
                                Offset="0" />
                            <GradientStop
                                Color="White"
                                Offset="1" />
                        </LinearGradientBrush>
                    </Ellipse.Stroke>
                </Ellipse>
                <Ellipse
                    x:Name="ellipse"
                    StrokeThickness="3"
                    Margin="6"
                    Stroke="{x:Null}">
                    <Ellipse.Fill>
                        <RadialGradientBrush>
                            <GradientStop
                                Color="Red" />
                            <GradientStop
                                Color="#FF580000"
                                Offset="1" />
                        </RadialGradientBrush>
                    </Ellipse.Fill>
                </Ellipse>
                <Ellipse
                    StrokeThickness="3"
                    Margin="6"
                    Stroke="{x:Null}">
                    <Ellipse.Fill>
                        <LinearGradientBrush
                            EndPoint="0.5,1"
                            MappingMode="RelativeToBoundingBox"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="White" />
                            <GradientStop
                                Offset="1" />
                        </LinearGradientBrush>
                    </Ellipse.Fill>
                </Ellipse>
                <ContentPresenter
                    Margin="20" />
            </Grid>
        </ControlTemplate>
        <Storyboard
            x:Key="sound6_mp3"/>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger
            RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard
                Storyboard="{StaticResource sound6_mp3}" />
        </EventTrigger>
    </Window.Triggers>
    <Grid
        x:Name="LayoutRoot">
        <StackPanel
            Orientation="Horizontal"
            VerticalAlignment="Bottom"
            HorizontalAlignment="Center"
            Margin="0,0,0,11">
            <Button
                x:Name="_btn1"
                Content=""
                HorizontalAlignment="Left"
                Margin="4,4,4,0"
                Template="{DynamicResource ButtonControlTemplate1}"
                Width="75"
                Height="75" >
            	<i:Interaction.Triggers>
            		<i:EventTrigger EventName="Click">
            			<ei:PlaySoundAction Source="pack://siteoforigin:,,,/sound1.wma" Volume="1"/>
            		</i:EventTrigger>
            	</i:Interaction.Triggers>
            </Button>
            <Button
                x:Name="_btn2"
                Content=""
                HorizontalAlignment="Left"
                Margin="4,4,4,0"
                Template="{DynamicResource ButtonControlTemplate1}"
                Width="75"
                Height="75" >
            	<i:Interaction.Triggers>
            		<i:EventTrigger EventName="Click">
            			<ei:PlaySoundAction Volume="1" Source="pack://siteoforigin:,,,/sound2.wma"/>
            		</i:EventTrigger>
            	</i:Interaction.Triggers>
            </Button>
            <Button
                x:Name="_btn3"
                Content=""
                HorizontalAlignment="Left"
                Margin="4,4,4,0"
                Template="{DynamicResource ButtonControlTemplate1}"
                Width="75"
                Height="75" >
            	<i:Interaction.Triggers>
            		<i:EventTrigger EventName="Click">
            			<ei:PlaySoundAction Volume="1" Source="pack://siteoforigin:,,,/sound3.wma"/>
            		</i:EventTrigger>
            	</i:Interaction.Triggers>
            </Button>
            <Button
                x:Name="_btn4"
                Content=""
                HorizontalAlignment="Left"
                Margin="4,4,4,0"
                Template="{DynamicResource ButtonControlTemplate1}"
                Width="75"
                Height="75" >
            	<i:Interaction.Triggers>
            		<i:EventTrigger EventName="Click">
            			<ei:PlaySoundAction Source="pack://siteoforigin:,,,/sound1.wma" Volume="1"/>
            		</i:EventTrigger>
            	</i:Interaction.Triggers>
            </Button>
            <Button
                x:Name="_btn5"
                Content=""
                HorizontalAlignment="Left"
                Margin="4,4,4,0"
                Template="{DynamicResource ButtonControlTemplate1}"
                Width="75"
                Height="75" >
            	<i:Interaction.Triggers>
            		<i:EventTrigger EventName="Click">
            			<ei:PlaySoundAction Source="pack://siteoforigin:,,,/sound5.wma"/>
            		</i:EventTrigger>
            	</i:Interaction.Triggers>
            </Button>
            <Button
                x:Name="_btn6"
                Content=""
                HorizontalAlignment="Left"
                Margin="4,4,4,0"
                Template="{DynamicResource ButtonControlTemplate1}"
                Width="75"
                Height="75" >
            	<i:Interaction.Triggers>
            		<i:EventTrigger EventName="Click">
            			<ei:PlaySoundAction Volume="1" Source="pack://siteoforigin:,,,/sound6.mp3"/>
            		</i:EventTrigger>
            	</i:Interaction.Triggers>
            </Button>

        </StackPanel>
        <Button
            x:Name="CloseButton"
            HorizontalAlignment="Right"
            VerticalAlignment="Top"
            Margin="0,8,8,0"
            Click="Button_Click">
            <Image
                Height="48"
                Source="CloseRed.png"
                Stretch="Fill"
                Width="48" />
        </Button>
    </Grid>
</Window>
